class Log #:nodoc:
  include MongoMapper::Document
  
  key :type, String, :default=> "Error"
  key :message, String
  key :exception, String
  key :created_on, Time
  
  before_save :set_defaults
  
  def set_defaults
    if self.created_on == nil
      self.created_on = Time.now
    end
  end
  def to_s
    return self.to_yaml
  end
end